#include <cstdio>

int main(int argc, char* argv[]){
  int T;
  int i, count = 0;
  double sum = 0;
  char c;
  double result = 0;
  scanf("%d",&T);
  c = getchar();
  for (i = 0 ; i < T ; i++){
    sum = 0;
    count = 0;
    while ((c = getchar()) != '\n'){
      if ( c >= '0' && c <= '9'){
      sum += c + 0 - '0';
      count++;
      }
    }
    result = sum*1.0/count;
    if (i == 0)
      printf("%.1f",result);
    else
      printf("%.1f ",result);
  }
  
}
